package com.example.yiparkapplication.tool;

import android.app.Activity;

import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;

public class WindyWeChat {
    public static final String APP_ID = ConfigKeys.WE_CHAT_APP_ID.toString();
    private final IWXAPI WXAPI;
    private WindyWeChat(){
        final Activity activity = new Activity();
        WXAPI = WXAPIFactory.createWXAPI(activity, APP_ID, true);
        WXAPI.registerApp(APP_ID);
    }

    public final IWXAPI getWXAPI(){
        return WXAPI;
    }

    private static final class Holder{
        private static final WindyWeChat INSTANCE = new WindyWeChat();
    }

    public static WindyWeChat getInstance(){
        return Holder.INSTANCE;
    }
}
